using System;
using System.Collections.Generic;
using System.Text;

namespace Xeml.Document.EnvironmentalOntology
{
    public class DefaultCycle :IEnumerable<KeyValuePair<TimeSpan,string>>
    {
        private List<KeyValuePair<TimeSpan, string>> vals;

        public void AddValue(TimeSpan duration, string val)
        {
            KeyValuePair<TimeSpan, string> kv = new KeyValuePair<TimeSpan, string>(duration,val);
            vals.Add(kv);

        }

        public DefaultCycle()
        {
            this.vals = new List<KeyValuePair<TimeSpan, string>>();
        }

        #region IEnumerable<KeyValuePair<TimeSpan,string>> Member

        public IEnumerator<KeyValuePair<TimeSpan, string>> GetEnumerator()
        {
            return this.vals.GetEnumerator();
        }

        #endregion

        #region IEnumerable Member

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return this.vals.GetEnumerator();
        }

        #endregion
    }
}
